package cn.com.guage.huawei;

import java.util.Scanner;

public class 字符串分隔 {
	public static void main(String[] args) {
		Scanner read = new Scanner(System.in);
		subStringWord5(read);
		
	}

	public static void subStringWord5(Scanner sc) {
		while (sc.hasNext()) {
			String str = sc.nextLine();
			StringBuffer sb = new StringBuffer(str);
			if (str.length() % 8 != 8) {
				sb.append("00000000");
			}
			String nstr = sb.toString();
			// int subnum = nstr.length()/8;
			while (nstr.length() >= 8) {
				String result = nstr.substring(0, 8);
				System.out.println(result);
				nstr = nstr.substring(8);
			}

		}
	}

	public static void subStringWord4(Scanner sc) {
		while (sc.hasNext()) {
			String str = sc.nextLine();
			StringBuffer sb = new StringBuffer(str);
			if (str.length() % 8 != 8) {
				sb.append("00000000");
			}
			String nstr = sb.toString();
			int subnum = nstr.length() / 8;
			// System.out.println(nstr);
			// System.out.println(nstr.length());
			// System.out.println(nstr.length() / 8);
			for (int i = 0; i < subnum; i++) {
				String result = nstr.substring(0, 8);
				System.out.println(result);
				nstr = nstr.substring(8);
			}

		}
	}

	public static void subStringWord3(Scanner sc) {
		while (sc.hasNext()) {
			String str = sc.nextLine();
			p(str);
		}
	}

	public static void p(String str) {
		if (str.length() > 8) {
			System.out.println(str.substring(0, 8));
			p(str.substring(8, str.length()));
		} else {
			StringBuffer strb = new StringBuffer(str);
			for (int i = str.length(); i < 8; i++) {
				strb.append("0");
			}
			System.out.println(strb);
		}
	}

	public static void subStringWord1(Scanner read) {
		while (read.hasNext()) {
			String str = read.nextLine();
			int length = str.length();
			String result = "";
			if (length <= 8) {
				String temp = "";
				for (int i = 0; i < 8 - length; i++) {
					temp = temp + "0";
				}
				result = str + temp;
				System.out.println(result);
			} else {
				// int num = length / 8 + 1;
				// String[] array = str.split("");
				// int arrayLength = array.length;

				int temp = 8 - str.length() % 8;
				if (temp != 8) {
					for (int j = 0; j < temp; j++) {
						str = str + "0";
					}
				}

				// System.out.println(str);
				// System.out.println(str.length());
				// System.out.println(str.length() / 8);
				for (int k = 0; k < str.length() / 8; k++) {
					String substr = str.substring(k * 8, k * 8 + 8);
					System.out.println(substr);

				}
			}

		}
	}

	// 优先推荐
	public static void subStringWord2(Scanner sc) {
		while (sc.hasNext()) {
			String s = new String(sc.nextLine());
			if (s.length() % 8 != 0)
				s = s + "00000000";

			while (s.length() >= 8) {
				System.out.println(s.substring(0, 8));
				s = s.substring(8);
			}
		}
	}
}
